using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
public partial class Admin_KhachHangDetail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            load_data();
        }
    }
    private void load_data()
    {
        try
        {
            int iD = int.Parse(Request.QueryString["id"].ToString());
            tbKhachHang khachhang = tbKhachHangBUS.GetByID(iD);
            if (khachhang != null)
            {
                lit_MaKH.Text = khachhang.IdKhachHang.ToString();
                lit_TenKH.Text = khachhang.HoTen.ToString();
                lit_Email.Text = khachhang.Email.ToString();
                lit_MatKhau.Text = khachhang.MatKhau.ToString();
                lit_DiaChi.Text = khachhang.DiaChi.ToString();
                lit_DienThoai.Text = khachhang.DienThoai.ToString();
            }
        }
        catch
        {
            Response.Redirect("~/Admin/KhachHangList.aspx");
        }
    }
}
